package news.utils.request;

import news.utils.httpclient.ClientMethodUtils;
import news.utils.httpclient.HttpClientManger;

import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.CloseableHttpClient;
  
  
public class BaseTestRequest {  
      
    public static String getContent(String url) {  
        HttpGet get = new HttpGet(url);  
        CloseableHttpClient client = HttpClientManger.newInstance().getClient();  
        String page = ClientMethodUtils.getContent(client, get);  
        return page;  
    }  
  
  
      
    public static String postContent(String url) {  
        HttpPost get = new HttpPost(url);  
        CloseableHttpClient client = HttpClientManger.newInstance().getClient();  
        String page = ClientMethodUtils.getContent(client, get);  
        return page;  
    }  
      
}  

